<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        /* #app .searchbox{

        } */
        #app .searchbox input{
            background-color: aliceblue;
            border: none;
            border-radius: 20px;
            width: 75%;
            margin: 10px;
            height: 25px;
            padding-left: 10px;
        }
        #app .searchbox span{
            color: blue;
        }
        #app .block .list span{
            height: 20px;
            background: #f5f5f5;
            margin-left: 10px;
            margin-bottom: 5px;
            border-radius: 6px;
            padding: 5px;
            font-size: 12px;
            display: inline-block;
        }
        #app .block h3{
            margin: 10px;
        }
    </style>
</head>
<body>
    <div id="app">
        <div class="searchbox">
            <input type="text" placeholder="搜索" v-model="searchText">
            <span @click="search">搜索</span>
        </div>
        <div class="block">
            <h3>历史搜索</h3>
            <div class="list">
                <span v-for="(item,index) in searchArr">{{item}}</span>
            </div>
        </div>
    </div>
</body>
</html>
<script src="./vue-2.5.21.js"></script>
<script src="./search.js"></script>
